<template>
    <el-row  class="warp-bom">
        <el-col :span="4" class="warp-left">
            <el-menu :default-active="$route.path" router unique-opened  class="el-menu-vertical-demo"  theme="dark" router>
                <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
                    <el-submenu :index="item.path"  v-if="item.children.length>0">
                        <template slot="title">{{item.name}}</template>
                        <el-menu-item v-for="children in item.children" :index="item.path + '/' + children.path">{{children.name}}</el-menu-item>
                    </el-submenu>
                    <el-menu-item :index="item.path" v-if="item.children.lengt<=0">{{item.name}}</el-menu-item>
                </template>
            </el-menu>
        </el-col>
        <router-view></router-view>
    </el-row>
</template>
<style>

</style>
<script>
    export default{
        data(){
            return{
                msg:'hello vue'
            }
        },
        components:{

        }
    }
</script>
